﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace TransferLedgerDocListUIModel
{
	[Serializable]
	public partial class TransferLedgerDocListUIModelModel : UIModel
	{
		#region Constructor
		public TransferLedgerDocListUIModelModel() : base("TransferLedgerDocListUIModel")
		{
			InitClass();
			this.SetResourceInfo("491ecae1-48f0-4b0a-b741-41a85de092d7");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private TransferLedgerDocListUIModelModel(bool isInit) : base("TransferLedgerDocListUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new TransferLedgerDocListUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private TransferLedgerView viewTransferLedger;			
		#endregion
		
		#region links
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public TransferLedgerView TransferLedger
		{
			get { return (TransferLedgerView)this["TransferLedger"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewTransferLedger = new TransferLedgerView(this);
			this.viewTransferLedger.SetResourceInfo("c369b7a6-24d1-4704-84c6-dbdf0b4e1449");
			this.Views.Add(this.viewTransferLedger);			

			
		}

		public override string AssemblyName
		{
			get { return "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDListUI"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class TransferLedgerView : UIView
	{
		#region Constructor
		public TransferLedgerView(IUIModel model) : base(model,"TransferLedger","UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.TransferLedgerBE.TransferLedger", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private TransferLedgerView():base(null,"TransferLedger","UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.TransferLedgerBE.TransferLedger", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new TransferLedgerView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}
		public IUIField FieldCreatedOn
		{
			get { return this.Fields["CreatedOn"]; }
		}
		public IUIField FieldCreatedBy
		{
			get { return this.Fields["CreatedBy"]; }
		}
		public IUIField FieldModifiedOn
		{
			get { return this.Fields["ModifiedOn"]; }
		}
		public IUIField FieldModifiedBy
		{
			get { return this.Fields["ModifiedBy"]; }
		}
		public IUIField FieldSysVersion
		{
			get { return this.Fields["SysVersion"]; }
		}
		public IUIField FieldDepartment
		{
			get { return this.Fields["Department"]; }
		}
		public IUIField FieldDepartment_Code
		{
			get { return this.Fields["Department_Code"]; }
		}
		public IUIField FieldDepartment_Name
		{
			get { return this.Fields["Department_Name"]; }
		}
		public IUIField FieldStandardCost
		{
			get { return this.Fields["StandardCost"]; }
		}
		public IUIField FieldNonStandardCost
		{
			get { return this.Fields["NonStandardCost"]; }
		}
		public IUIField FieldRecycleMoney
		{
			get { return this.Fields["RecycleMoney"]; }
		}
		public IUIField FieldWasteRecycleMoney
		{
			get { return this.Fields["WasteRecycleMoney"]; }
		}
		public IUIField FieldProofNo
		{
			get { return this.Fields["ProofNo"]; }
		}
		public IUIField FieldWh
		{
			get { return this.Fields["Wh"]; }
		}
		public IUIField FieldWh_Code
		{
			get { return this.Fields["Wh_Code"]; }
		}
		public IUIField FieldWh_Name
		{
			get { return this.Fields["Wh_Name"]; }
		}
		public IUIField FieldAccountPeriod
		{
			get { return this.Fields["AccountPeriod"]; }
		}
		public IUIField FieldOrg
		{
			get { return this.Fields["Org"]; }
		}
		public IUIField FieldOrg_Code
		{
			get { return this.Fields["Org_Code"]; }
		}
		public IUIField FieldOrg_Name
		{
			get { return this.Fields["Org_Name"]; }
		}


		[Obsolete("请使用CurrentFilter属性，这个方法有可能会导致强弱类型转换出错")]
		public TransferLedgerDefaultFilterFilter DefaultFilter
		{
			get { return (TransferLedgerDefaultFilterFilter)this.CurrentFilter; }
		}
		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "ID", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","a073b178-2c11-4b26-b667-0654d9fa4599");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedOn", typeof(DateTime), true,"","System.DateTime", "CreatedOn", true,true, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","4936d9e0-ca92-4926-97c4-0cf018d67f06");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedBy", typeof(String), true,"","System.String", "CreatedBy", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","410aee0e-ef68-4cc4-b280-e38c81f3c9de");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedOn", typeof(DateTime), true,"","System.DateTime", "ModifiedOn", true,true, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","0b3d7a13-4ab3-4107-bfb4-4286306f7177");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedBy", typeof(String), true,"","System.String", "ModifiedBy", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","05a83141-1ff5-4a14-936c-97f2b2e38516");
			UIModelRuntimeFactory.AddNewUIField(this,"SysVersion", typeof(Int64), true,"0","System.Int64", "SysVersion", true,true, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","24b4060c-c490-46c9-98a3-80c081a55c08");
			UIModelRuntimeFactory.AddNewUIField(this,"Department", typeof(Int64), true,"","UFIDA.U9.CBO.HR.Department.Department", "Department", true,true, false, "",false,(UIFieldType)4,"3410e657-4f0f-47a9-9cf1-d1c421c116a8","dc77de05-eb9a-4762-b4ae-59fa996bbf2f");
			UIModelRuntimeFactory.AddNewUIField(this,"Department_Code", typeof(String), false,"","System.String", "Department.Code", false,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","21a97440-140b-4c9f-a08b-63a20ec0b099");
			UIModelRuntimeFactory.AddNewUIField(this,"Department_Name", typeof(String), true,"","System.String", "Department.Name", false,true, false, "",true,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","67944e65-a8cd-4ac1-957a-d8b3bd78edd3");
			UIModelRuntimeFactory.AddNewUIField(this,"StandardCost", typeof(Decimal), true,"0","System.Decimal", "StandardCost", true,true, false, "",false,(UIFieldType)1,"91031687-94bb-4988-a939-df7bf999ef4f","c3237a87-ca91-49f6-a854-f6a3b681ff84");
			UIModelRuntimeFactory.AddNewUIField(this,"NonStandardCost", typeof(Decimal), true,"0","System.Decimal", "NonStandardCost", true,true, false, "",false,(UIFieldType)1,"91031687-94bb-4988-a939-df7bf999ef4f","07d40a29-6127-4047-b4fe-d51196720c57");
			UIModelRuntimeFactory.AddNewUIField(this,"RecycleMoney", typeof(Decimal), true,"0","System.Decimal", "RecycleMoney", true,true, false, "",false,(UIFieldType)1,"91031687-94bb-4988-a939-df7bf999ef4f","97786c10-5051-4bd6-bb7a-52a3924f284b");
			UIModelRuntimeFactory.AddNewUIField(this,"WasteRecycleMoney", typeof(Decimal), true,"0","System.Decimal", "WasteRecycleMoney", true,true, false, "",false,(UIFieldType)1,"91031687-94bb-4988-a939-df7bf999ef4f","a3802476-9265-41df-ac21-f84bde8f3faf");
			UIModelRuntimeFactory.AddNewUIField(this,"ProofNo", typeof(String), true,"","System.String", "ProofNo", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","78e524c1-ff26-4a3d-88b6-e0a2b1df657d");
			UIModelRuntimeFactory.AddNewUIField(this,"Wh", typeof(Int64), true,"","UFIDA.U9.CBO.SCM.Warehouse.Warehouse", "Wh", true,true, false, "",false,(UIFieldType)4,"0fac5c83-2ab0-428f-bf82-c363857b37be","c098db8c-7ba4-434b-b6eb-17c7a8d43529");
			UIModelRuntimeFactory.AddNewUIField(this,"Wh_Code", typeof(String), false,"","System.String", "Wh.Code", false,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","106c12fe-4211-4970-8dcb-761ebcec7d2c");
			UIModelRuntimeFactory.AddNewUIField(this,"Wh_Name", typeof(String), true,"","System.String", "Wh.Name", false,true, false, "",true,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","dba0aa4b-035a-4229-8103-2fd24761bf7b");
			UIModelRuntimeFactory.AddNewUIField(this,"AccountPeriod", typeof(String), true,"","System.String", "AccountPeriod", true,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","f0231aa3-3170-4141-b938-0f63390a603e");
			UIModelRuntimeFactory.AddNewUIField(this,"Org", typeof(Int64), true,"","UFIDA.U9.Base.Organization.Organization", "Org", true,true, false, "",false,(UIFieldType)4,"73eb56da-f25a-4636-94e7-61b0cb4b7784","07259205-8734-4d3e-bc78-eec289e0b7b1");
			UIModelRuntimeFactory.AddNewUIField(this,"Org_Code", typeof(String), false,"","System.String", "Org.Code", false,true, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","6359de89-9df3-41cb-be37-457d6b37de54");
			UIModelRuntimeFactory.AddNewUIField(this,"Org_Name", typeof(String), true,"","System.String", "Org.Name", false,true, false, "",true,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","70276745-a5e0-485c-8878-d75c8c635211");


			this.CurrentFilter = new TransferLedgerDefaultFilterFilter(this);
		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new TransferLedgerRecord(builder);
		}
		#endregion

		#region new method
		public new TransferLedgerRecord FocusedRecord
		{
			get { return (TransferLedgerRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new TransferLedgerRecord AddNewUIRecord()
		{	
			return (TransferLedgerRecord)base.AddNewUIRecord();
		}
		public new TransferLedgerRecord NewUIRecord()
		{	
			return (TransferLedgerRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class TransferLedgerRecord : UIRecord
	{
		#region Constructor
		public TransferLedgerRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private TransferLedgerView uiviewTransferLedger
		{
			get { return (TransferLedgerView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new TransferLedgerRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewTransferLedger.FieldID);
			}
			set{
				this[this.uiviewTransferLedger.FieldID] = value;
			}
		}
		
		
		public  DateTime? CreatedOn
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldCreatedOn] ;
				//return (DateTime?)value;
				return GetValue<DateTime?>(this.uiviewTransferLedger.FieldCreatedOn);
			}
			set{
				this[this.uiviewTransferLedger.FieldCreatedOn] = value;
			}
		}
		
		
		public  String CreatedBy
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldCreatedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldCreatedBy);
			}
			set{
				this[this.uiviewTransferLedger.FieldCreatedBy] = value;
			}
		}
		
		
		public  DateTime? ModifiedOn
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldModifiedOn] ;
				//return (DateTime?)value;
				return GetValue<DateTime?>(this.uiviewTransferLedger.FieldModifiedOn);
			}
			set{
				this[this.uiviewTransferLedger.FieldModifiedOn] = value;
			}
		}
		
		
		public  String ModifiedBy
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldModifiedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldModifiedBy);
			}
			set{
				this[this.uiviewTransferLedger.FieldModifiedBy] = value;
			}
		}
		
		
		public new Int64? SysVersion
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldSysVersion] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewTransferLedger.FieldSysVersion);
			}
			set{
				this[this.uiviewTransferLedger.FieldSysVersion] = value;
			}
		}
		
		
		public  Int64? Department
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldDepartment] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewTransferLedger.FieldDepartment);
			}
			set{
				this[this.uiviewTransferLedger.FieldDepartment] = value;
			}
		}
		
		
		public  String Department_Code
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldDepartment_Code] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldDepartment_Code);
			}
			set{
				this[this.uiviewTransferLedger.FieldDepartment_Code] = value;
			}
		}
		
		
		public  String Department_Name
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldDepartment_Name] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldDepartment_Name);
			}
			set{
				this[this.uiviewTransferLedger.FieldDepartment_Name] = value;
			}
		}
		
		
		public  Decimal? StandardCost
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldStandardCost] ;
				//return (Decimal?)value;
				return GetValue<Decimal?>(this.uiviewTransferLedger.FieldStandardCost);
			}
			set{
				this[this.uiviewTransferLedger.FieldStandardCost] = value;
			}
		}
		
		
		public  Decimal? NonStandardCost
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldNonStandardCost] ;
				//return (Decimal?)value;
				return GetValue<Decimal?>(this.uiviewTransferLedger.FieldNonStandardCost);
			}
			set{
				this[this.uiviewTransferLedger.FieldNonStandardCost] = value;
			}
		}
		
		
		public  Decimal? RecycleMoney
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldRecycleMoney] ;
				//return (Decimal?)value;
				return GetValue<Decimal?>(this.uiviewTransferLedger.FieldRecycleMoney);
			}
			set{
				this[this.uiviewTransferLedger.FieldRecycleMoney] = value;
			}
		}
		
		
		public  Decimal? WasteRecycleMoney
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldWasteRecycleMoney] ;
				//return (Decimal?)value;
				return GetValue<Decimal?>(this.uiviewTransferLedger.FieldWasteRecycleMoney);
			}
			set{
				this[this.uiviewTransferLedger.FieldWasteRecycleMoney] = value;
			}
		}
		
		
		public  String ProofNo
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldProofNo] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldProofNo);
			}
			set{
				this[this.uiviewTransferLedger.FieldProofNo] = value;
			}
		}
		
		
		public  Int64? Wh
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldWh] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewTransferLedger.FieldWh);
			}
			set{
				this[this.uiviewTransferLedger.FieldWh] = value;
			}
		}
		
		
		public  String Wh_Code
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldWh_Code] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldWh_Code);
			}
			set{
				this[this.uiviewTransferLedger.FieldWh_Code] = value;
			}
		}
		
		
		public  String Wh_Name
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldWh_Name] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldWh_Name);
			}
			set{
				this[this.uiviewTransferLedger.FieldWh_Name] = value;
			}
		}
		
		
		public  String AccountPeriod
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldAccountPeriod] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldAccountPeriod);
			}
			set{
				this[this.uiviewTransferLedger.FieldAccountPeriod] = value;
			}
		}
		
		
		public  Int64? Org
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldOrg] ;
				//return (Int64?)value;
				return GetValue<Int64?>(this.uiviewTransferLedger.FieldOrg);
			}
			set{
				this[this.uiviewTransferLedger.FieldOrg] = value;
			}
		}
		
		
		public  String Org_Code
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldOrg_Code] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldOrg_Code);
			}
			set{
				this[this.uiviewTransferLedger.FieldOrg_Code] = value;
			}
		}
		
		
		public  String Org_Name
		{
			get{
				//object value = this[this.uiviewTransferLedger.FieldOrg_Name] ;
				//return (String)value;
				return GetValue<String>(this.uiviewTransferLedger.FieldOrg_Name);
			}
			set{
				this[this.uiviewTransferLedger.FieldOrg_Name] = value;
			}
		}
		#endregion
	}
	
	[Serializable]
	public class TransferLedgerDefaultFilterFilter : UIFilter
	{
		#region Constructor
		public TransferLedgerDefaultFilterFilter(IUIView view) 
			: base("DefaultFilter",view,@"",@"")
		{
			InitClass();
		}
		//for Clone Constructor
		private TransferLedgerDefaultFilterFilter()
			: base("DefaultFilter",null,"","")
		{}
		protected override IUIFilter CreateCloneInstance()
		{
			return new TransferLedgerDefaultFilterFilter();
		}
		#endregion

		#region property
		#endregion
		
		#region function
		private void InitClass()
		{
		}
		#endregion

	}



}